package com.lifa.controller;

import com.lifa.dao.ChongZhiDao;
import com.lifa.entity.Chongzhi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/chongzhi")
@Scope("prototype")
public class ChongZhiController {

    @Autowired
    private ChongZhiDao chongZhiDao;

    @RequestMapping("/chax")
    @ResponseBody
    public List<Chongzhi> chax() {
        return chongZhiDao.chax();
    }

}
